﻿
using UnityEngine;
public class GroundMoveHFSM : PlayerBaseHFSM {
	public GroundMoveHFSM(PlayerController controller, PlayerStateEnum stateName, State<PlayerStateEnum> superFSM, StateFactory<PlayerStateEnum> factory) : base(controller, stateName, superFSM, factory) {
		AddConditionToSelf(() => !IsZero(_controller.XInput));

		AddNewTransition(PlayerStateEnum.GroundOtherFSM, () => IsZero(_controller.XInput) && CurState is not PlayerSlide);

	}

	public override void Update() {
		base.Update();
		_controller.Velocity *= (int)_controller.StateData.MaxSpeedMultiple;
	}
}